﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class jhhh : MonoBehaviour
{

    private float distance;
    private void OnCollisionEnter2D(Collision2D coll)
    {
        distance = Vector2.Distance(coll.transform.position, this.transform.position);
        if (distance <= 5)
        {
            Xing.score -= 2;
            SceneManager.LoadScene("Last");
     
        }

    }
}
